#include "game.h"

extern Obj*game_home;
extern Obj*game_reload;

void showWinDlg()
{
 
}

void winDlgEve(int type,int p1,int p2)
{
 failDlgEve(type,p1,p2);
}

//绘制游戏胜利
void drawWinDlg()
{
 Obj*obj;
 char data[200];
 Room*room = _room;
 Cam*cam = &(room->cam);
 drawRect(0-cam->x,0-cam->y,
  SW,SH,0x50000000);
 
 drawRect(50-cam->x,SH/3-20-cam->y,
  SW-100,150,0xffffffff);
 drawRect(50-cam->x,SH/3-20-cam->y,
  SW-100,150,0x80ff0000);
 
 sprintf(data,
  "      游戏胜利！",level);
 fnt_drawline(GM.fnt_20_cn,
  data,50-cam->x,SH/3-cam->y);
 
 obj = game_home;
 obj->view = TRUE;
 obj->x = 50+32-cam->x;
 obj->y = SH/3+80-cam->x;
 drawObjPos(obj,obj->x-cam->x,
  obj->y-cam->y);
 
 obj = game_reload;
 obj->view = TRUE;
 obj->x = SW-80-30-cam->x;
 obj->y = SH/3+80-cam->x;
 drawObjPos(obj,obj->x-cam->x,
  obj->y-cam->y);
}

